finding the percentage hackerrank solutions in python